import request from '@/utils/request'

// 查询起送量配置列表
export function listMinorderquantity(query) {
  return request({
    url: '/business/minorderquantity/list',
    method: 'get',
    params: query
  })
}

// 查询起送量配置详细
export function getMinorderquantity(id) {
  return request({
    url: '/business/minorderquantity/' + id,
    method: 'get'
  })
}

// 新增起送量配置
export function addMinorderquantity(data) {
  return request({
    url: '/business/minorderquantity',
    method: 'post',
    data: data
  })
}

// 修改起送量配置
export function updateMinorderquantity(data) {
  return request({
    url: '/business/minorderquantity',
    method: 'put',
    data: data
  })
}

// 起送量配置状态修改
export function changeMinorderquantityStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/business/minorderquantity/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除起送量配置
export function delMinorderquantity(id) {
  return request({
    url: '/business/minorderquantity/' + id,
    method: 'delete'
  })
}
